﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

using MSAcademic.v2.Web.Models;

namespace MSAcademic.v2.Web.Controllers
{
    public partial class AuthorController : Controller
    {

        public ActionResult ViewProfile(int authorId)
        {
            var vModel = _authorViewModelFactory();
            vModel.AuthorId = authorId;
            
            return View(vModel);
        }

    }

    public partial class AuthorController
    {
        private readonly Func<AuthorViewModel> _authorViewModelFactory;
        public AuthorController(Func<AuthorViewModel> authorViewModelFactory)
        {
            _authorViewModelFactory = authorViewModelFactory;
        }
    }
}
